package org.ch00.test08.demo3;

import java.util.Random;

/**
 * 天师
 *
 * @author ZJL
 * @date 2025-03-04
 */
public class TaoistMaster {

    public void exorcise(WardOffEvil wardOffEvil) {
        System.out.println("收你来了...");
        wardOffEvil.wardOff();
        int rand = new Random().nextInt(2);
        if (rand == 0) {
            System.out.println("捉妖失败...");
            return;
        }
        System.out.println("捉妖成功！");
    }
}
